package com.cn.pojo;

import org.springframework.stereotype.Repository;

@Repository
public class BooDaoImpl implements BookDao{
    @Override
    public void save() {
        System.out.println(System.currentTimeMillis());
        System.out.println("book dao save...");
    }

    @Override
    public void update() {
        System.out.println("book dao update...");
    }

    @Override
    public void throwException() {
        try{
            int i = 1/0;
        }catch (ArithmeticException e){
            e.printStackTrace();
        }finally {
            System.out.println("抛出异常了");
        }
    }

    @Override
    public int addNumbers(int a, int b) {
        return a+b;
    }
}
